import request from '@/utils/request'

/**
 * // 分页获取留言
 * @param params{ page: 1, limit: 10 }默认值
 * @returns {AxiosPromise}
 */

export function getMessages(params = { page: 1, limit: 10 }) {
  return request({
    url: '/api/message',
    method: 'get',
    params: {
      ...params,
      blogid: 'all'
    }
  })
}

export function delMessage(id) {
  return request({
    url: `/api/message/${id}`,
    method: 'delete'
  })
}
